﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HTES.TAS.Plugin;
using RSXXXWrapPlugin;
using System.Windows.Forms;

namespace RS
{
    class RSXXXPlugin : PluginBase, IPlugin
    {
        private RSXXXConfigDlg mTHPluginUserControl = null;
        public RSXXXPlugin()
        {
            this.Description = "by BH";
            this.Name = "BH";
            this.Version = "1.0.0.0";
            //
            mTHPluginUserControl = new RSXXXConfigDlg();
        }

        public override UserControl GetArgumentPane()
        {
            return mTHPluginUserControl;
        }

        public override void Start()
        {
//             RSXXXWrapper pRS = new RSXXXWrapper();
// 
//             //设置参数
//             pRS.setInputImg(mTHPluginUserControl.getInputImagePath());
//             pRS.setOutputImg(mTHPluginUserControl.getOutImagePath());
//             pRS.setFunctionCallBack(showProgressText);
// 
//             //处理
//             pRS.disPose();

            for (int i = 0; i < 100; i++)
            {
                this.Host.Log(this, LogLevel.Info, "ST", "cont");
            }
        }

        private void showProgressText(int nPos, String text)
        {
            ProgressPercent = nPos;
            this.Host.Log(this, LogLevel.Info, "", text);
        }

        public override bool VerifyArguments()
        {
            return (null != mTHPluginUserControl) && (mTHPluginUserControl.VerifyArguments());
        }


    }
}
